Add comprehensive symmetry testing framework documentation and CI#4
Merged
stevevanhooser merged 7 commits intomainfrom Apr 11, 2026
Merged
Add comprehensive symmetry testing framework documentation and CI#4stevevanhooser merged 7 commits intomainfrom
stevevanhooser merged 7 commits intomainfrom
Conversation
Mirror the comprehensive NDI-python bridge spec so NDR developers have step-by-step guidance for authoring new bridge files, including the active-maintenance rules, upstream-change detection via matlab_last_sync_hash, and a section on how to bootstrap a new bridge YAML file for a new sub-package.
Runs the full 4-stage NDR cross-language symmetry cycle on pushes to main, pull requests targeting main, and manual dispatch: 1. MATLAB makeArtifacts (writes matlabArtifacts/) 2. Python readArtifacts (reads matlabArtifacts/) 3. Python makeArtifacts (writes pythonArtifacts/) 4. MATLAB readArtifacts (reads pythonArtifacts/) This runs separately from the regular ci.yml Python test job so that it can evolve independently and only executes when the symmetry suite changes or a full cross-language cycle is explicitly needed.
Both MATLAB stages were failing before any tests ran because:
1. `addpath(genpath("+ndr"))` is invalid: MATLAB namespace (+foo)
directories must not appear on the path themselves, only their
parents. Replace with `addpath(ndrRoot)` plus
`addpath(ndrRoot/tools/tests)` so both the top-level `+ndr` and
the test `+ndr/+symmetry` packages are discoverable.
2. `ndr_Init` tried to `mkdir` a filecache path under `userpath`
which isn't writable on the CI runner. The symmetry tests only
need `ndr.fun.ndrpath()` (self-contained), so skip `ndr_Init`.
Also use an explicit `ndrRoot` variable so the `cd` indirection is
gone and `pwd` stays at the workspace root throughout the job.
Two fixes to get the cross-language symmetry CI actually running:
1. The NDR-matlab checkout was defaulting to `main`, which does not
contain the `+ndr/+symmetry` package until the feature branch is
merged. Pass `ref: ${{ github.head_ref || github.ref_name }}` so
NDR-matlab is checked out at the same branch name as the
NDR-python change under test (developers are expected to keep
branch names in sync across the two repos, the same way this
feature branch does). After both repos merge to main, the same
expression resolves to `main`.
2. Install NDR-matlab's tools/requirements.txt via
matbox.installRequirements so vhlab-toolbox-matlab (which
provides vlt.string.*) is available to the reader.intan_rhd
symmetry tests in both MATLAB stages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR significantly expands the cross-language symmetry testing framework for NDR-python ↔ NDR-matlab parity by adding comprehensive documentation, implementation guides, and a new GitHub Actions CI workflow to automate the full test cycle.
Key Changes
Enhanced
symmetry_tests.md: Completely restructured and expanded the developer documentation with:Expanded
ndr_matlab_python_bridge.yamlspecification: Reorganized into 6 numbered sections with:matlab_last_sync_hashNew GitHub Actions workflow (
test-symmetry.yml):New instruction files:
tests/symmetry/make_artifacts/INSTRUCTIONS.md: Rules and examples for generating artifactstests/symmetry/read_artifacts/INSTRUCTIONS.md: Rules and examples for validating artifactsNotable Implementation Details
matlab-actions/setup-matlab@v2andehennestad/matbox-actions/install-matbox@v1for MATLAB environment setupmatlab_last_sync_hashfield enables efficient detection of upstream MATLAB changes for maintenancehttps://claude.ai/code/session_01BWkrpUgzWSQx48s8Tk6fnT